/*********************************************************************************************************/
* REGRESSIONS
/*********************************************************************************************************/

clear all
cls
set more off, permanently

/*********************************************************************************************************/

/* Here you should cd to your root directory and all other paths are then set relative to this  */
cd "/Users/etc/etc"

global dtas "../03_DTAs"
global temp "temp"
/*********************************************************************************************************/
/*********************************************************************************************************/

use $dtas/Regressions_Paper_DST_EUR_RSV

/*********************************************************************************************************/
/*********************************************************************************************************/

describe
xtset date period 

gen Lag17_RSV = RSV[_n-17]
gen Lag16_RSV = RSV[_n-16]
gen Lag15_RSV = RSV[_n-15]
gen Lag14_RSV = RSV[_n-14]
gen Lag13_RSV = RSV[_n-13]
gen Lag12_RSV = RSV[_n-12]
gen Lag11_RSV = RSV[_n-11]
gen Lag10_RSV = RSV[_n-10]
gen Lag9_RSV = RSV[_n-9]
gen Lag8_RSV = RSV[_n-8]
gen Lag7_RSV = RSV[_n-7]
gen Lag6_RSV = RSV[_n-6]
gen Lag5_RSV = RSV[_n-5]
gen Lag4_RSV = RSV[_n-4]
gen Lag3_RSV = RSV[_n-3]
gen Lag2_RSV = RSV[_n-2]
gen Lag1_RSV = RSV[_n-1]

gen RETURNS = Ret*10000
gen DST = dummy


/*********************************************************************************************************/


est clear

foreach i in 7 8 9 10 11{

	cap drop temp1
	cap drop temp2
	gen temp1=Lag`i'_RSV
	gen temp2=DST*temp1
	
	qui: eststo: reg RETURNS temp1 DST temp2 if period==`i', rob cluster(month)
	estadd scalar R=100*(e(r2))
	estadd scalar Nobs=e(N)
	
}

esttab, nostar nonumbers mtitles("24-01" "01-02" "02-03" "03-04" "04-05")   
